Optimal. Leaf size=77 \[ -\frac {\left (a^2-b^2\right ) (a+b \sin (c+d x))^3}{3 b^3 d}+\frac {a (a+b \sin (c+d x))^4}{2 b^3 d}-\frac {(a+b \sin (c+d x))^5}{5 b^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2747, 711}
\begin {gather*} -\frac {\left (a^2-b^2\right ) (a+b \sin (c+d x))^3}{3 b^3 d}-\frac {(a+b \sin (c+d x))^5}{5 b^3 d}+\frac {a (a+b \sin (c+d x))^4}{2 b^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 2747
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {\text {Subst}\left (\int (a+x)^2 \left (b^2-x^2\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {\text {Subst}\left (\int \left (\left (-a^2+b^2\right ) (a+x)^2+2 a (a+x)^3-(a+x)^4\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=-\frac {\left (a^2-b^2\right ) (a+b \sin (c+d x))^3}{3 b^3 d}+\frac {a (a+b \sin (c+d x))^4}{2 b^3 d}-\frac {(a+b \sin (c+d x))^5}{5 b^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 56, normalized size = 0.73 \begin {gather*} \frac {(a+b \sin (c+d x))^3 \left (-a^2+7 b^2+3 b^2 \cos (2 (c+d x))+3 a b \sin (c+d x)\right )}{30 b^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.35, size = 78, normalized size = 1.01
method | result | size |
derivativedivides | \(\frac {b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {a b \left (\cos ^{4}\left (d x +c \right )\right )}{2}+\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(78\) |
default | \(\frac {b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {a b \left (\cos ^{4}\left (d x +c \right )\right )}{2}+\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(78\) |
risch | \(\frac {3 a^{2} \sin \left (d x +c \right )}{4 d}+\frac {b^{2} \sin \left (d x +c \right )}{8 d}-\frac {\sin \left (5 d x +5 c \right ) b^{2}}{80 d}-\frac {a b \cos \left (4 d x +4 c \right )}{16 d}+\frac {a^{2} \sin \left (3 d x +3 c \right )}{12 d}-\frac {\sin \left (3 d x +3 c \right ) b^{2}}{48 d}-\frac {a b \cos \left (2 d x +2 c \right )}{4 d}\) | \(113\) |
norman | \(\frac {\frac {4 a b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a b \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a^{2} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 \left (2 a^{2}+b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {8 \left (2 a^{2}+b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {4 \left (25 a^{2}-4 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}+\frac {4 a b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a b \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(203\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 73, normalized size = 0.95 \begin {gather*} -\frac {6 \, b^{2} \sin \left (d x + c\right )^{5} + 15 \, a b \sin \left (d x + c\right )^{4} - 30 \, a b \sin \left (d x + c\right )^{2} + 10 \, {\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{3} - 30 \, a^{2} \sin \left (d x + c\right )}{30 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 69, normalized size = 0.90 \begin {gather*} -\frac {15 \, a b \cos \left (d x + c\right )^{4} + 2 \, {\left (3 \, b^{2} \cos \left (d x + c\right )^{4} - {\left (5 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} - 10 \, a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )}{30 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.27, size = 107, normalized size = 1.39 \begin {gather*} \begin {cases} \frac {2 a^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac {a b \cos ^{4}{\left (c + d x \right )}}{2 d} + \frac {2 b^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\left (c \right )}\right )^{2} \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.48, size = 80, normalized size = 1.04 \begin {gather*} -\frac {6 \, b^{2} \sin \left (d x + c\right )^{5} + 15 \, a b \sin \left (d x + c\right )^{4} + 10 \, a^{2} \sin \left (d x + c\right )^{3} - 10 \, b^{2} \sin \left (d x + c\right )^{3} - 30 \, a b \sin \left (d x + c\right )^{2} - 30 \, a^{2} \sin \left (d x + c\right )}{30 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.05, size = 74, normalized size = 0.96 \begin {gather*} -\frac {{\sin \left (c+d\,x\right )}^3\,\left (\frac {a^2}{3}-\frac {b^2}{3}\right )-a^2\,\sin \left (c+d\,x\right )+\frac {b^2\,{\sin \left (c+d\,x\right )}^5}{5}-a\,b\,{\sin \left (c+d\,x\right )}^2+\frac {a\,b\,{\sin \left (c+d\,x\right )}^4}{2}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________